Skip to content
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

Removed and fixed sizing #35

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/api/resumeItemInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ export const updateItem = async (
token: string,
) => {
try {
console.log(updatedFields);
// console.log(updatedFields);
if (token === undefined) {
throw new Error("Token is undefined");
}

console.log("updateItem token: ", token);
// console.log("updateItem token: ", token);
switch (itemType) {
case resumeItemTypes.HEADING:
await updateHeading(updatedFields, itemId, token);
Expand Down
2 changes: 1 addition & 1 deletion src/components/BugReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function BugReport({ setDialogOpen }: BugReportProps) {
bugBrowser: data.browswer,
};

console.log("Bug Data");
// console.log("Bug Data");

try {
console.log("Bug Report Submitted!");
Expand Down
1 change: 0 additions & 1 deletion src/components/NewItemDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const NewItemDropdown: React.FC<{
setDropdownIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
templateId: templates | undefined;
}> = ({ dropdownIsOpen, setDropdownIsOpen, templateId }) => {
console.log("templateId in newitemdropdown:", templateId);
return (
<DropdownMenu open={dropdownIsOpen} onOpenChange={setDropdownIsOpen}>
<DropdownMenuTrigger asChild>
Expand Down
1 change: 0 additions & 1 deletion src/components/PageCount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const PageCount: React.FC<{
if (latexCode != null) {
generatePdfBlobSafe(latexCode, true)
.then((res) => {
console.log("blob generated");
setBlob(res);
})
.catch((err) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ResumeItemDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const ResumeItemTypeDropdown: React.FC<{
<DropdownMenu open={typeDropdown} onOpenChange={setTypeDropdown}>
<DropdownMenuTrigger asChild>
<Button className="h-full" variant="ghost">
<img src={Filter} alt="filterimg" className="w-[1rem] h-[1rem]" />
<img src={Filter} alt="filterimg" className="min-w-[1rem] min-h-[1rem] w-[1rem] h-[1rem]" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ResumeName.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const ResumeName: React.FC<{

return (
<Input
className="m-2 min-w-[50px] h-full rounded-md ml-8 px-2 bg-white"
className="m-2 min-w-[50px] h-full rounded-md px-2 bg-white"
type="text"
value={resumeName}
onChange={handleInputChange}
Expand Down
1 change: 0 additions & 1 deletion src/components/resume-items/activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ export function ExtracurricularItem({
};
if (submissionType == formSubmissionTypes.EDIT) {
try {
console.log("templateId passed into activity edit:", templateId);
// Call the mutation function with necessary parameters
mutation.mutate({
itemType: resumeItemTypes.ACTIVITY,
Expand Down
2 changes: 0 additions & 2 deletions src/components/resume-items/skill-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,6 @@ export function SkillItem({
description: data.description,
};

console.log(skillsData);

if (submissionType == formSubmissionTypes.EDIT) {
try {
// Call the mutation function with necessary parameters
Expand Down
4 changes: 0 additions & 4 deletions src/hooks/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,11 @@ export const useUpdateItem = (
updatedFields: itemUpdatedFields;
}) => {
if (token === undefined || templateId === undefined) {
console.log("templateId is undefined");
throw new Error("Token is undefined or templateId is undefined");
}
console.log("First Layer");
console.log(updatedFields);
return await updateItem(itemType, itemId, updatedFields, token);
},
onSuccess: (_, { itemId, templateId }) => {
console.log("calling invalidate item:", `${itemId}${templateId}`);
invalidateItem(`${itemId}${templateId}`);
queryClient.invalidateQueries({ queryKey: ["items"] });
},
Expand Down
1 change: 0 additions & 1 deletion src/latexUtils/pdfUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ export const use2ndPageRenderer = (
if (onRenderEnd != null) {
onRenderEnd();
}
console.log("no second page");
});
})
.catch((err) => {
Expand Down
1 change: 0 additions & 1 deletion src/pages/Auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const Login: React.FC = () => {
try {
setError("");
const alal = await login(values.email, values.password);
console.log(alal);
navigate("/"); // Redirect to home page
} catch (err: any) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument
Expand Down
17 changes: 9 additions & 8 deletions src/pages/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,17 +345,17 @@ const Editor: React.FC = () => {
</Button>
</div>
</div>
<div className="w-full h-[3rem] flex items-center bg-white">
<Card className="w-full h-[2.5rem] mr-3 ml-3 bg-[#e7ecef] flex items-center p-1">
<div className="flex items-center justify-start justify-between w-1/2">
<div className="w-full flex items-center bg-white p-1">
<Card className="w-full mr-3 ml-3 bg-[#e7ecef] flex flex-col lg:flex-row p-1">
<div className="flex items-center h-[2rem] justify-start justify-between w-full lg:w-1/2 lg:ml-8 mb-1 lg:mb-0">
<NewItemDropdown
dropdownIsOpen={dropdownIsOpen}
setDropdownIsOpen={setDropdownIsOpen}
templateId={resume?.templateId}
templateId={resume?.templateId}
></NewItemDropdown>
<div className="flex items-center">
<Input
className="w-[1/2] h-full"
className="lg:w-[1/2] w-full h-full"
placeholder="Search Items..."
value={searchQuery}
onChange={handleSearchChange}
Expand All @@ -381,8 +381,9 @@ const Editor: React.FC = () => {
</SelectGroup>
</SelectContent>
</Select>
<div className=""></div>
</div>
<div className="flex items-center justify-start w-1/2">
<div className="flex items-center h-[2rem] justify-start w-full lg:w-1/2">
<ResumeName
token={storedToken}
resumeId={id as string}
Expand Down Expand Up @@ -546,7 +547,7 @@ const Editor: React.FC = () => {
resume?.templateId,
)}
cacheKey={`${item._id}${resume?.templateId}`}
showMessage
showMessage
></LatexImage>
</div>
<Skeleton
Expand Down Expand Up @@ -608,7 +609,7 @@ const Editor: React.FC = () => {
resume?.templateId,
)}
cacheKey={`${item._id}${resume?.templateId}`}
showMessage
showMessage
></LatexImage>
</div>
<Skeleton
Expand Down
2 changes: 0 additions & 2 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ const Home: React.FC = () => {
} = useAddResume(queryClient, storedToken);

useEffect(() => {
console.log("doing cache fill");
generatePdfBlobSafe(testlatex4);
// generatePdfBlobSafe(cacheLatex1);
}, []);
Expand All @@ -56,7 +55,6 @@ const Home: React.FC = () => {

mutate(blankResume, {
onSuccess: (response) => {
console.log("response:", response);
navigate(`/editor/${response._id}`);
},
onError: () => {
Expand Down
Loading