- Implemented user authentication with signup and signin functionality. - Created a context for managing authentication state. - Added protected routes for accessing the dashboard and tracker pages. - Developed a tracker page for logging cigarette usage with optional notes and timestamps. - Introduced a statistics page to visualize daily smoking habits using charts. - Integrated Axios for API requests and error handling. - Updated package dependencies including React Hook Form and Zod for form validation. - Enhanced UI components for better user experience with Chakra UI. - Added routing for authentication and tracking pages.
18 lines
434 B
TypeScript
18 lines
434 B
TypeScript
import { getNavigation, getNavigationValue } from '@brojs/cli'
|
|
|
|
import pkg from '../../package.json'
|
|
|
|
const baseUrl = getNavigationValue(`${pkg.name}.main`)
|
|
const navs = getNavigation()
|
|
const makeUrl = (url) => baseUrl + url
|
|
|
|
export const URLs = {
|
|
baseUrl,
|
|
auth: {
|
|
url: makeUrl(navs[`link.${pkg.name}.auth`]),
|
|
isOn: Boolean(navs[`link.${pkg.name}.auth`])
|
|
},
|
|
tracker: makeUrl('/tracker'),
|
|
stats: makeUrl('/stats'),
|
|
}
|