-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add my subscription page #156
Add my subscription page #156
Conversation
a71b50f
to
20464af
Compare
20464af
to
efad2ec
Compare
efad2ec
to
627220c
Compare
627220c
to
29313f0
Compare
src/App/routes/index.tsx
Outdated
props: {}, | ||
}, | ||
context: { | ||
title: 'My Subscription', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: 'My Subscription', | |
title: 'My Subscriptions', |
src/App/routes/index.tsx
Outdated
@@ -57,6 +57,20 @@ const homeLayout = customWrapRoute({ | |||
}, | |||
}); | |||
|
|||
const mySubscription = customWrapRoute({ | |||
parent: rootLayout, | |||
path: 'subscription', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path: 'subscription', | |
path: 'subscriptions', |
src/components/Navbar/i18n.json
Outdated
@@ -6,6 +6,8 @@ | |||
"appAbout": "About", | |||
"appResources": "Resources", | |||
"headerMenuHome": "Home", | |||
"headerMenuMySubscription": "My Subscription" | |||
"headerMenuMySubscription": "My Subscription", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"headerMenuMySubscription": "My Subscription", | |
"headerMenuMySubscription": "My Subscriptions", |
src/views/Home/AlertsMap/index.tsx
Outdated
const [isModalOpen, setModalOpen] = useState(false); | ||
|
||
const openModal = () => setModalOpen(true); | ||
const closeModal = () => setModalOpen(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use useModalState or useBooleanState
src/views/Home/AlertsTable/index.tsx
Outdated
const [isModalOpen, setModalOpen] = useState(false); | ||
|
||
const openModal = () => setModalOpen(true); | ||
const closeModal = () => setModalOpen(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as before
@@ -0,0 +1,43 @@ | |||
import { MoreOptionsIcon } from '@ifrc-go/icons'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary components
@@ -0,0 +1,38 @@ | |||
import { Container } from '@ifrc-go/ui'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a single one and reuse in both
import styles from './styles.module.css'; | ||
|
||
interface Props { | ||
data: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
send necessary data individually
src/views/MySubscription/index.tsx
Outdated
const [isModalOpen, setModalOpen] = useState(false); | ||
|
||
const openModal = () => setModalOpen(true); | ||
|
||
const closeModal = () => setModalOpen(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not do this
const [isCheckboxChecked, setCheckboxChecked] = useState(false); | ||
const [selectedValue, setSelectedValue] = useState('daily'); | ||
const [alertTitle, setAlertTitle] = useState(''); | ||
|
||
const handleCheckboxChange = (checked: any) => { | ||
setCheckboxChecked(checked); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create a proper form based on the created subscription data structure
29313f0
to
c0f04cd
Compare
66a57d4
to
2cbc2b4
Compare
2cbc2b4
to
8285519
Compare
8285519
to
5cc51d4
Compare
Addresses:
Depends on:
Changes
This PR doesn't introduce:
console.log
meant for debugging