-
-
Notifications
You must be signed in to change notification settings - Fork 31
ts conversion #41
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
base: clerk-authentication
Are you sure you want to change the base?
ts conversion #41
Changes from all commits
587b911
942bd5c
497f438
a2b3614
4fe6d34
bc6bf7b
7853efe
43d7860
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import React from 'react'; | ||
import { NoFilesFoundSVG } from './SVGs'; | ||
|
||
const NoDocumentFound = ({ text }) => ( | ||
const NoDocumentFound = ({ text }: { text: string }) => ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move these types to interface |
||
<div className="bg-primary flex flex-col items-center justify-center flex-1 col-span-full"> | ||
<NoFilesFoundSVG width={200} height={300} /> | ||
<h5 className="text-white text-xl font-medium pb-10 lg:ml-6">{text}</h5> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,10 @@ const sections = [ | |
}, | ||
]; | ||
|
||
const RightSideBar = ({ handlePrint }) => { | ||
const RightSideBar = ({ handlePrint }: { handlePrint: () => void }) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move these types to interface |
||
const matches = useMediaQuery('(min-width:1024px)'); | ||
const sectionTitles = sections.map(e => e.label); | ||
const sectionDrawerStates = {}; | ||
const sectionDrawerStates: Record<string, boolean> = {}; | ||
sectionTitles.map(section => (sectionDrawerStates[section] = false)); | ||
|
||
const useStyles = makeStyles({ | ||
|
@@ -56,11 +56,11 @@ const RightSideBar = ({ handlePrint }) => { | |
...sectionDrawerStates, | ||
}); | ||
|
||
const toggleRightDrawer = (anchor, open) => () => { | ||
const toggleRightDrawer = (anchor: string, open: boolean) => () => { | ||
setRightDrawerState({ ...rightDrawerState, [anchor]: open }); | ||
}; | ||
|
||
const rightList = anchor => ( | ||
const rightList = (anchor: string) => ( | ||
<div className={matches ? clsx(classes.list) : clsx(classes.fullList)} role="presentation"> | ||
{anchor === 'font-face' && <GoogleFontsList closeDrawer={toggleRightDrawer(anchor, false)} anchor={anchor} />} | ||
{anchor === 'update-title' && <UpdateTitle closeDrawer={toggleRightDrawer(anchor, false)} anchor={anchor} />} | ||
|
@@ -73,7 +73,7 @@ const RightSideBar = ({ handlePrint }) => { | |
<div key={id} className="inline-block lg:block my-4 lg:my-8"> | ||
<Tooltip title={title} placement={matches ? 'right' : 'bottom'} arrow> | ||
<Button onClick={toggleRightDrawer(label, true)}> | ||
<Icon style={{ color: 'white' }} size="100px" /> | ||
<Icon style={{ color: 'white', fontSize: '30px' }} /> | ||
</Button> | ||
</Tooltip> | ||
<Drawer anchor="right" open={rightDrawerState[label]} onClose={toggleRightDrawer(label, false)}> | ||
|
@@ -83,7 +83,7 @@ const RightSideBar = ({ handlePrint }) => { | |
))} | ||
<Tooltip title="Print Resume" placement={matches ? 'right' : 'bottom'} arrow> | ||
<Button onClick={handlePrint}> | ||
<PrintIcon style={{ color: 'white' }} size="100px" /> | ||
<PrintIcon style={{ color: 'white', fontSize: '30px' }} /> | ||
</Button> | ||
</Tooltip> | ||
</div> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
import { Button } from '@material-ui/core'; | ||
import DeleteIcon from '@material-ui/icons/Delete'; | ||
import EditIcon from '@material-ui/icons/Edit'; | ||
import React from 'react'; | ||
|
||
const ExtrasCard = ({ title, type, items, onDelete, openEditExtForm, extraActive, id }) => ( | ||
interface ExtrasCardTypes { | ||
title: string; | ||
type: string; | ||
items: string[]; | ||
onDelete: (data: { id: string }) => void; | ||
openEditExtForm: () => void; | ||
extraActive: Record<string, boolean>; | ||
id: string; | ||
} | ||
|
||
const ExtrasCard = ({ title, type, items, onDelete, openEditExtForm, extraActive, id }: ExtrasCardTypes) => ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move these types to interface |
||
<> | ||
<div className="flex justify-between items-center"> | ||
<p className="font-light text-lg">{title}</p> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,45 @@ | ||
import Image from 'next/image'; | ||
import React from 'react'; | ||
interface ResumeTemplate { | ||
customStyles: { | ||
font: string; | ||
// You can add more style properties here if needed | ||
}; | ||
template: boolean; | ||
experience: string[]; | ||
education: string[]; | ||
extras: string[]; | ||
_id: string; | ||
userId: string; | ||
title: string; | ||
templateName: string; | ||
createdAt: string; | ||
updatedAt: string; | ||
__v: number; | ||
personal: string; | ||
id: string; | ||
} | ||
interface Templatetype { | ||
title: string; | ||
templateName: string; | ||
} | ||
|
||
const TemplateCard = ({ template, selected, onSelect, type }) => ( | ||
const TemplateCard = ({ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move these types to interface |
||
template, | ||
selected, | ||
onSelect, | ||
type, | ||
}: { | ||
template: ResumeTemplate; | ||
selected: boolean; | ||
onSelect: (data: ResumeTemplate) => void; | ||
type: string; | ||
}) => ( | ||
<div | ||
onClick={() => onSelect(template)} | ||
onClick={() => { | ||
console.log(template); | ||
onSelect(template); | ||
console.log(template); | ||
}} | ||
onKeyUp={() => onSelect(template)} | ||
role="button" | ||
tabIndex={0} | ||
|
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.
move these types to interface
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.
as in like this