chore: cleanup (comments, imports order)@@ -154,20 +154,20 @@ const InstantRouterIndicator: ReactIsland<InstantRouterIndicatorProps> = () => {
const blinkAnimation = keyframes`
/**
* At the start of the animation the dot
- * has an opacity of .2
+ * has an opacity of .67
*/
0% {
opacity: .67;
}
/**
- * At 20% the dot is fully visible and
+ * At 20% the line is fully visible and
* then fades out slowly
*/
20% {
opacity: 1;
}
/**
- * Until it reaches an opacity of .2 and
+ * Until it reaches an opacity of .67 and
* the animation can start again
*/
100% {
@@ -12,7 +12,7 @@ import { Grid } from "../components/Grid";
import { buildRouteLink } from "../utils/shared";
export interface RepositoriesListProps {
- repositories: Array<Repository & { parentOrg: Organization }>;
+ repositories: (Repository & { parentOrg: Organization })[];
}
const RepositoriesList: ReactIsland<
@@ -45,10 +45,10 @@ export const makeRequestHandler = {
currentUserId: curr_user_uid,
currentUserRole: curr_user_role,
currentUserUsername: curr_user_username,
- gitStamp: request.gitStamp,
flashMessage: flash_message,
- title,
+ gitStamp: request.gitStamp,
themeScheme,
+ title,
},
} as T & { commonProps: CommonViewProps };
@@ -2,27 +2,15 @@
import { preHandlerHookHandler } from "fastify";
// lib
import { Const } from "../../const";
-// import { Env } from "../../env";
export const sessionSetupPreHandler: preHandlerHookHandler = (
request,
reply,
done
) => {
- // load session data from store if any
- // request.session.reload();
-
if (request.cookies.theme_scheme == null) {
reply.setCookie("theme_scheme", Const.DEFAULT_THEME_SCHEME);
}
- // if no session was set previously, lets set one.
- // if (
- // request.cookies[Env.COOKIE_NAME] == null ||
- // request.session.sessionId == null
- // ) {
- // reply.redirect(307, request.url);
- // }
-
done();
};
@@ -97,5 +97,3 @@ describe("buildRouteLink", () => {
expect(link).toMatchInlineSnapshot(`"/@test-user"`);
});
});
-
-describe("buildPathLink", () => {});
@@ -6,7 +6,7 @@ import React from "react";
import type { Organization, Repository, User } from "@prisma/client";
// app
import type { CommonProps } from "../../types";
-import { Layout, PageWrapper } from "../../components";
+import { IslandWrapper, Layout, PageWrapper } from "../../components";
// app islands
import RepositoriesList from "../../islands/RepositoriesList";
@@ -29,17 +29,14 @@ const UserDetailsView: ReactView<UserDetailsViewProps> = ({
<h2 style={{ opacity: 0.67 }}>
{currentUser != null && currentUser.id === user.id
? "Your repositories"
- : "Public repositories from this user"}
+ : `Public repositories from ${user.displayName || user.username}`}
</h2>
- <div
- data-islandid={`${RepositoriesList.name}$$0`}
- style={{ width: "100%" }}
- >
+ <IslandWrapper data-islandid={`${RepositoriesList.name}$$0`}>
<RepositoriesList
repositories={repositories}
themeScheme={commonProps.themeScheme}
/>
- </div>
+ </IslandWrapper>
</PageWrapper>
</Layout>
);