File tree Expand file tree Collapse file tree 5 files changed +40
-47
lines changed Expand file tree Collapse file tree 5 files changed +40
-47
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export const AddCard = ({
1919 < div
2020 onClick = { onClick }
2121 className = { clsx (
22- 'card-md row justify-center items-center gap-x-1 text-gray-400 border-gray-400 h-full border-2 border-dashed hover:brightness-95' ,
22+ 'card-md row justify-center items-center gap-x-1 text-gray-400 border-gray-400 h-full border-2 border-dashed hover:brightness-95 min-h-28 ' ,
2323 { 'cursor-pointer' : ! ! onClick } ,
2424 className
2525 ) }
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export const EditCard = ({
2020 return (
2121 < div
2222 className = { clsx (
23- 'card-md row w-full h-full gap-x-4 justify-between overflow-hidden' ,
23+ 'card-md row w-full h-full gap-x-4 justify-between overflow-hidden min-h-28 ' ,
2424 {
2525 'pr-2' : ! ! onEditClick ,
2626 'cursor-pointer' : ! ! onClick ,
Original file line number Diff line number Diff line change @@ -86,24 +86,20 @@ export const DashboardDisplay = ({
8686 </ LoadingAndErrorComponent >
8787 < LoadingAndErrorComponent isLoading = { isLoadingWards } >
8888 < div className = "col gap-y-1" >
89- { wards && wards . length > 0 && (
90- < >
91- < span className = "textstyle-title-normal" > { translation . wards } </ span >
92- < div className = "grid @max-md:grid-cols-1 @xl:grid-cols-2 @4xl:grid-cols-3 gap-6" >
93- { wards ?. map ( ward => (
94- < WardCard
95- key = { ward . id }
96- ward = { ward }
97- onClick = { ( ) => router . push ( `/ward/${ ward . id } ` ) }
98- />
99- ) ) }
100- < AddCard
101- text = { translation . addWard }
102- onClick = { ( ) => router . push ( `/organizations/${ organization ?. id } ` ) }
103- />
104- </ div >
105- </ >
106- ) }
89+ < span className = "textstyle-title-normal" > { translation . wards } </ span >
90+ < div className = "grid @max-md:grid-cols-1 @xl:grid-cols-2 @4xl:grid-cols-3 gap-6" >
91+ { wards && wards . length > 0 && wards ?. map ( ward => (
92+ < WardCard
93+ key = { ward . id }
94+ ward = { ward }
95+ onClick = { ( ) => router . push ( `/ward/${ ward . id } ` ) }
96+ />
97+ ) ) }
98+ < AddCard
99+ text = { translation . addWard }
100+ onClick = { ( ) => router . push ( `/organizations/${ organization ?. id } ` ) }
101+ />
102+ </ div >
107103 </ div >
108104 </ LoadingAndErrorComponent >
109105 </ div >
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ type OrganizationDisplayTranslation = {
1919
2020const defaultOrganizationDisplayTranslations : Record < Languages , OrganizationDisplayTranslation > = {
2121 en : {
22- addOrganization : 'Add new Organization' ,
22+ addOrganization : 'Add Organization' ,
2323 yourOrganizations : 'Your Organizations'
2424 } ,
2525 de : {
Original file line number Diff line number Diff line change @@ -53,35 +53,32 @@ export const WardDisplay = ({
5353 isLoading = { isLoading }
5454 hasError = { isError }
5555 >
56- { wards && (
57- < div className = "grid @max-md:grid-cols-1 @xl:grid-cols-2 @4xl:grid-cols-3 gap-6" >
58- { wards . map ( ward => (
59- < WardCard
60- key = { ward . id }
61- ward = { ward }
62- onEditClick = { ( ) => context . updateContext ( {
63- ...context . state ,
64- wardId : ward . id
65- } ) }
66- onClick = { ( ) => {
67- router . push ( `/ward/${ ward . id } ` ) . catch ( console . error )
68- } }
69- className = { clsx ( {
70- 'border-2 border-primary' : selectedWardId === ward . id
71- } ) }
72- />
73- ) ) }
74- < AddCard
75- className = "min-h-[76px]"
76- text = { translation . addWard }
77- onClick = { ( ) => context . updateContext ( {
56+ < div className = "grid @max-md:grid-cols-1 @xl:grid-cols-2 @4xl:grid-cols-3 gap-6" >
57+ { wards && wards . map ( ward => (
58+ < WardCard
59+ key = { ward . id }
60+ ward = { ward }
61+ onEditClick = { ( ) => context . updateContext ( {
7862 ...context . state ,
79- wardId : ''
63+ wardId : ward . id
64+ } ) }
65+ onClick = { ( ) => {
66+ router . push ( `/ward/${ ward . id } ` ) . catch ( console . error )
67+ } }
68+ className = { clsx ( {
69+ 'border-2 border-primary' : selectedWardId === ward . id
8070 } ) }
81- // TODO isSelected={!selectedWardId}
8271 />
83- </ div >
84- ) }
72+ ) ) }
73+ < AddCard
74+ text = { translation . addWard }
75+ onClick = { ( ) => context . updateContext ( {
76+ ...context . state ,
77+ wardId : ''
78+ } ) }
79+ // TODO isSelected={!selectedWardId}
80+ />
81+ </ div >
8582 </ LoadingAndErrorComponent >
8683 </ div >
8784 )
You can’t perform that action at this time.
0 commit comments