s/name/component/ (react.html.erb)

This commit is contained in:
0x1eef 2024-04-25 05:58:26 -03:00
parent dfb85bb14c
commit 9aefa69e70
2 changed files with 2 additions and 2 deletions

View file

@ -7,7 +7,7 @@
"Projects" => ["projects"]
}.each do |component, paths|
compile "/html/react.html.erb", rep: component do
filter(:erb, locals: {name: "react-#{component.downcase}", src: "/js/main.js"})
filter(:erb, locals: {component: "react-#{component.downcase}", src: "/js/main.js"})
paths.each do |path|
(path == "/") ? write("/index.html") : write("/#{path}/index.html")
end

View file

@ -7,7 +7,7 @@
<link rel="icon" href="/favicon.svg"/>
</head>
<body>
<div class="<%= name %> w-full wrapper font-sans"></div>
<div class="<%= component %> w-full wrapper font-sans"></div>
<script src="<%= src %>"></script>
</body>
</html>