Skip to content

Commit

Permalink
Don't round-trip the object string, that's dumb.
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1DEA committed Nov 25, 2023
1 parent 0fd9dbd commit 4d7c77f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions app/Http/Controllers/Game/StencilController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ public function index(): Responsable
])->meta('Stencils', 'Share custom creations for others to use!');
}

public function create(Request $request): Responsable
public function create(): Responsable
{
return page('Stencils/Create', [
'data' => $request->string('data')
])
return page('Stencils/Create')
->meta('New Stencil', 'Share a new stencil')
->breadcrumbs([
crumb('Stencils', route('stencils.index'))
Expand Down
6 changes: 2 additions & 4 deletions resources/js/Pages/Stencils/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import Button from "@/Jetstream/Button.vue";
import route from "ziggy-js";
import Errors from "@/Components/Errors.vue";
const props = defineProps({
data: String
})
const data = window.location.hash.substring(1, window.location.hash.length);
const form = useForm({
name: '',
description: '',
object_string: props.data ?? '',
object_string: data ?? '',
})
const submit = () => {
Expand Down

0 comments on commit 4d7c77f

Please sign in to comment.