Skip to content

Commit

Permalink
feat: implement client-side fetching of projects after putting in api…
Browse files Browse the repository at this point in the history
… key
  • Loading branch information
f0rbit committed Jan 30, 2025
1 parent 0254907 commit 86066cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
7 changes: 1 addition & 6 deletions client/src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ function Profile() {
const INTEGRATION_STATES = {
devto: { name: "devto", enabled: true },
medium: { name: "medium", enabled: false },
substack: { name: "substack", enabled: false },
devpad: { name: "devpad", enabled: true }
} as const;

Expand Down Expand Up @@ -310,7 +309,7 @@ function DevpadCard({ refetch }: { refetch: () => Promise<void> }) {
setLoading(false);
return;
}
//await fetchProjects();
await fetchProjects();
};

const fetchProjects = async () => {
Expand All @@ -332,10 +331,6 @@ function DevpadCard({ refetch }: { refetch: () => Promise<void> }) {
setLoading(false);
};

useEffect(() => {
//fetchProjects();
}, []);

if (loading) return <Oval width={18} height={18} strokeWidth={8} />;

return (
Expand Down
14 changes: 0 additions & 14 deletions src/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,8 @@ type FetchLink struct {
type Project struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
OwnerID string `json:"owner_id"`
Name string `json:"name"`
Description string `json:"description"`
Specification string `json:"specification"`
RepoURL string `json:"repo_url"`
RepoID string `json:"repo_id"`
IconURL string `json:"icon_url"`
Status string `json:"status"`
Deleted bool `json:"deleted"`
LinkURL string `json:"link_url"`
LinkText string `json:"link_text"`
Visibility string `json:"visibility"`
CurrentVersion string `json:"current_version"`
ScanBranch string `json:"scan_branch"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}

type ProjectCache struct {
Expand Down

0 comments on commit 86066cd

Please sign in to comment.