Skip to content

Commit

Permalink
do not set repo.name on creation, use "Untitled" as placeholder (code…
Browse files Browse the repository at this point in the history
  • Loading branch information
lihebi authored and sudongyuer committed Dec 14, 2022
1 parent e9528be commit 76c59a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions api/src/resolver_repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export async function createRepo(_, { id, name, isPublic }, { userId }) {
const repo = await prisma.repo.create({
data: {
id: await nanoid(),
name: "Untitled",
owner: {
connect: {
id: userId,
Expand Down Expand Up @@ -153,7 +152,6 @@ export async function updateRepo(_, { id, name }, { userId }) {
name,
},
});
console.log("updatedRepo", updatedRepo);
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/repo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ function RepoWrapper({ children, id }) {
<Stack direction="row">
<TextField
hiddenLabel
defaultValue={"Untitled"}
value={repoName}
placeholder="Untitled"
value={repoName || ""}
size="small"
sx={{
maxWidth: "100%",
Expand Down

0 comments on commit 76c59a0

Please sign in to comment.