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

⚙️ Added Config options (#83) #83

Merged
merged 1 commit into from
May 17, 2023
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
10 changes: 7 additions & 3 deletions components/profile/ProfileButtonAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ function ProfileButtonAction({
};

const handleStartProcess = useCallback(() => {
processJsonDownloaded();
setIsDownload(true);
if (isMdPreview) {
processJsonDownloaded();
setIsDownload(true);
} else {
toast.warn("Please Switch Preview Code");
}
}, [isDownLoad]);

const handleDownloadJson = (value: ProfileAtomDetails) => {
Expand Down Expand Up @@ -143,7 +147,7 @@ function ProfileButtonAction({
className="bg-gray-700 text-gray-300 hover:bg-slate-600 dark:bg-gray-300 dark:hover:bg-gray-400 dark:text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center gap-2"
>
<BsFiletypeJson size={20} />
<span>Save Markdown</span>
<span>Download Backup</span>
</button>
<button
onClick={() =>
Expand Down
2 changes: 1 addition & 1 deletion components/profile/process/components/Options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function Options({
onClick={handleProcess}
className="my-5 w-full flex justify-center bg-blue-500 text-gray-100 p-4 rounded-full tracking-wide font-semibold focus:outline-none focus:shadow-outline hover:bg-blue-600 shadow-lg cursor-pointer transition ease-in duration-300"
>
Upload
Process
</button>
</div>
</form>
Expand Down
3 changes: 1 addition & 2 deletions lib/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ const Request = () => {
const fetchData = async () => {
try {
const skills: SkillsType = await fetch(
"https://globalmusicbeats.github.io/skill/Skills.json"
/* process.env.NEXT_PUBLIC_SKILL_API_KEY! */
process.env.NEXT_PUBLIC_SKILL_API_KEY!
).then((res) => res.json());

setSkills(skills);
Expand Down