Compare commits
3 Commits
feat/add-n
...
fix/regres
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da4b2e68ab | ||
|
|
5557b1bcba | ||
|
|
f4b5f98a44 |
@@ -84,11 +84,6 @@ export const SetHookDialog: React.FC<{ account: IAccount }> = ({ account }) => {
|
|||||||
snap.files?.[snap.active]?.name?.split(".")?.[0] || ""
|
snap.files?.[snap.active]?.name?.split(".")?.[0] || ""
|
||||||
);
|
);
|
||||||
const calculateHashedValue = useCallback(async () => {
|
const calculateHashedValue = useCallback(async () => {
|
||||||
console.log(
|
|
||||||
"-->",
|
|
||||||
namespace,
|
|
||||||
snap.files?.[snap.active]?.name?.split(".")?.[0]
|
|
||||||
);
|
|
||||||
const hashedVal = await sha256(namespace);
|
const hashedVal = await sha256(namespace);
|
||||||
setHashedNamespace(hashedVal.toUpperCase());
|
setHashedNamespace(hashedVal.toUpperCase());
|
||||||
}, [namespace]);
|
}, [namespace]);
|
||||||
|
|||||||
@@ -28,18 +28,19 @@ export const fetchFiles = (gistId: string) => {
|
|||||||
const resHeader = await fetch(`${process.env.NEXT_PUBLIC_COMPILE_API_BASE_URL}/api/header-files`);
|
const resHeader = await fetch(`${process.env.NEXT_PUBLIC_COMPILE_API_BASE_URL}/api/header-files`);
|
||||||
if (resHeader.ok) {
|
if (resHeader.ok) {
|
||||||
resHeaderJson = await resHeader.json();
|
resHeaderJson = await resHeader.json();
|
||||||
|
const files = {
|
||||||
|
...res.data.files,
|
||||||
|
'hookapi.h': res.data.files?.['hookapi.h'] || { filename: 'hookapi.h', content: resHeaderJson.hookapi, language: 'C' },
|
||||||
|
'hookmacro.h': res.data.files?.['hookmacro.h'] || { filename: 'hookmacro.h', content: resHeaderJson.hookmacro, language: 'C' },
|
||||||
|
'sfcodes.h': res.data.files?.['sfcodes.h'] || { filename: 'sfcodes.h', content: resHeaderJson.sfcodes, language: 'C' },
|
||||||
|
};
|
||||||
|
res.data.files = files;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err)
|
console.log(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
const files = {
|
|
||||||
...res.data.files,
|
|
||||||
'hookapi.h': res.data.files?.['hookapi.h'] || { filename: 'hookapi.h', content: resHeaderJson.hookapi, language: 'C' },
|
|
||||||
'hookmacro.h': res.data.files?.['hookmacro.h'] || { filename: 'hookmacro.h', content: resHeaderJson.hookmacro, language: 'C' },
|
|
||||||
'sfcodes.h': res.data.files?.['sfcodes.h'] || { filename: 'sfcodes.h', content: resHeaderJson.sfcodes, language: 'C' },
|
|
||||||
};
|
|
||||||
res.data.files = files;
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
// If you want to load templates from GIST instad, uncomment the code below and comment the code above.
|
// If you want to load templates from GIST instad, uncomment the code below and comment the code above.
|
||||||
|
|||||||
Reference in New Issue
Block a user